1. Field of the Invention
The present invention is related generally to a data processing system and in particular to a method and apparatus for the migration of a software partition. More particularly, the present invention is directed to a computer implemented method, apparatus, and computer usable program code for checkpointing and restarting stream based pseudo terminals.
2. Description of the Related Art
In a software partitioned environment, a single instance of the operating system can be partitioned into multiple virtual operating system environments. Each of these virtual operating system environments is known as a software partition. A software partition is a virtualized operating system environment within a single instance of the operating system. Software running within each software partition will appear to have its own separate instance of the operating system. A software partition may include one or more processes. An example of a software partition is AIX® workload partition (WPAR), which is a product available from International Business Machines (IBM®) Corporation.
Data processing systems frequently utilize data integrity operations to ensure that the state of data stored in memory may be recreated in the event of a failure. A checkpoint operation is a data integrity operation in which the application state and memory contents for an application running on the kernel are written to stable storage at particular time points to provide a basis upon which to recreate the state of an application in the event of a failure. The particular time point at which state and memory contents are written to stable storage may be referred to as a checkpoint.
Checkpoint data may be used to migrate or restore a software partition, including any processes running in the partition, from one computing device to another computing device, while processes are still running in the software partition. The computing devices may be a separate physical computing device or a separate logical computing device on the same physical machine. Migration of a software partition involves checkpointing the state of every process in the partition on one data processing system and then restoring the state of every process on another data processing system using the checkpoint data.
A pseudo terminal is a pseudo-device pair that provides a terminal interface without an associated computer terminal or other hardware. Instead, software replaces the role of the underlying hardware for the pseudo terminal session.
For each pseudo terminal, the operating system provides two devices: a master device (PTM) and a slave device (PTS). Data written to the master side is received by the slave side as if it was the result of a user typing at an ordinary terminal, and data written to the slave side is sent to the master side as if it was written on an ordinary terminal. In this way, the process manipulating the master side of the pseudo-terminal has control over the information read and written on the slave side, as if it were manipulating the keyboard and reading the screen on a real terminal. When employed over the network the master side of the pseudo-terminal is connected to a socket enabling the remote user's keyboard input to manipulate the local process connected to the slave device and creating remote login capabilities.
Currently, if a user is logged in to an application associated with a pseudo terminal, such as a remote login (rlogin), telnet, emacs, or xterm on X Windows, the application cannot be checkpointed and restored unless the user first logs out of the application. In other words, the user must end their login session and disrupt the user's utilization of the application before the application can be moved to a different application server or restored. This is an inefficient process that can also be annoying and inconvenient to the user.